/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entityprojet;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Ron
 */
@Entity
@Table(name = "F_COMPTEA")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FComptea.findAll", query = "SELECT f FROM FComptea f"),
    @NamedQuery(name = "FComptea.findByNAnalytique", query = "SELECT f FROM FComptea f WHERE f.nAnalytique = :nAnalytique"),
    @NamedQuery(name = "FComptea.findByCANum", query = "SELECT f FROM FComptea f WHERE f.cANum = :cANum"),
    @NamedQuery(name = "FComptea.findByCAIntitule", query = "SELECT f FROM FComptea f WHERE f.cAIntitule = :cAIntitule"),
    @NamedQuery(name = "FComptea.findByCAType", query = "SELECT f FROM FComptea f WHERE f.cAType = :cAType"),
    @NamedQuery(name = "FComptea.findByCAClassement", query = "SELECT f FROM FComptea f WHERE f.cAClassement = :cAClassement"),
    @NamedQuery(name = "FComptea.findByCARaccourci", query = "SELECT f FROM FComptea f WHERE f.cARaccourci = :cARaccourci"),
    @NamedQuery(name = "FComptea.findByCAReport", query = "SELECT f FROM FComptea f WHERE f.cAReport = :cAReport"),
    @NamedQuery(name = "FComptea.findByNAnalyse", query = "SELECT f FROM FComptea f WHERE f.nAnalyse = :nAnalyse"),
    @NamedQuery(name = "FComptea.findByCASaut", query = "SELECT f FROM FComptea f WHERE f.cASaut = :cASaut"),
    @NamedQuery(name = "FComptea.findByCASommeil", query = "SELECT f FROM FComptea f WHERE f.cASommeil = :cASommeil"),
    @NamedQuery(name = "FComptea.findByCADateCreate", query = "SELECT f FROM FComptea f WHERE f.cADateCreate = :cADateCreate"),
    @NamedQuery(name = "FComptea.findByCADomaine", query = "SELECT f FROM FComptea f WHERE f.cADomaine = :cADomaine"),
    @NamedQuery(name = "FComptea.findByCAAchat", query = "SELECT f FROM FComptea f WHERE f.cAAchat = :cAAchat"),
    @NamedQuery(name = "FComptea.findByCAVente", query = "SELECT f FROM FComptea f WHERE f.cAVente = :cAVente"),
    @NamedQuery(name = "FComptea.findByCbProt", query = "SELECT f FROM FComptea f WHERE f.cbProt = :cbProt"),
    @NamedQuery(name = "FComptea.findByCbMarq", query = "SELECT f FROM FComptea f WHERE f.cbMarq = :cbMarq"),
    @NamedQuery(name = "FComptea.findByCbCreateur", query = "SELECT f FROM FComptea f WHERE f.cbCreateur = :cbCreateur"),
    @NamedQuery(name = "FComptea.findByCbModification", query = "SELECT f FROM FComptea f WHERE f.cbModification = :cbModification"),
    @NamedQuery(name = "FComptea.findByCbReplication", query = "SELECT f FROM FComptea f WHERE f.cbReplication = :cbReplication"),
    @NamedQuery(name = "FComptea.findByCbFlag", query = "SELECT f FROM FComptea f WHERE f.cbFlag = :cbFlag")})
public class FComptea implements Serializable {
    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @Column(name = "N_Analytique")
    private short nAnalytique;
    @Basic(optional = false)
    @Column(name = "CA_Num")
    private String cANum;
    @Lob
    @Column(name = "cbCA_Num")
    private byte[] cbCANum;
    @Column(name = "CA_Intitule")
    private String cAIntitule;
    @Column(name = "CA_Type")
    private Short cAType;
    @Column(name = "CA_Classement")
    private String cAClassement;
    @Lob
    @Column(name = "cbCA_Classement")
    private byte[] cbCAClassement;
    @Column(name = "CA_Raccourci")
    private String cARaccourci;
    @Lob
    @Column(name = "cbCA_Raccourci")
    private byte[] cbCARaccourci;
    @Column(name = "CA_Report")
    private Short cAReport;
    @Column(name = "N_Analyse")
    private Short nAnalyse;
    @Column(name = "CA_Saut")
    private Short cASaut;
    @Column(name = "CA_Sommeil")
    private Short cASommeil;
    @Column(name = "CA_DateCreate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date cADateCreate;
    @Column(name = "CA_Domaine")
    private Short cADomaine;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "CA_Achat")
    private BigDecimal cAAchat;
    @Column(name = "CA_Vente")
    private BigDecimal cAVente;
    @Column(name = "cbProt")
    private Short cbProt;
    @Id
    @Basic(optional = false)
    @Column(name = "cbMarq")
    private Integer cbMarq;
    @Column(name = "cbCreateur")
    private String cbCreateur;
    @Column(name = "cbModification")
    @Temporal(TemporalType.TIMESTAMP)
    private Date cbModification;
    @Column(name = "cbReplication")
    private Integer cbReplication;
    @Column(name = "cbFlag")
    private Short cbFlag;
    @OneToMany(mappedBy = "fComptea")
    private Collection<FComptet> fComptetCollection;
    @OneToMany(mappedBy = "fComptea1")
    private Collection<FComptet> fComptetCollection1;

    public FComptea() {
    }

    public FComptea(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public FComptea(Integer cbMarq, short nAnalytique, String cANum) {
        this.cbMarq = cbMarq;
        this.nAnalytique = nAnalytique;
        this.cANum = cANum;
    }

    public short getNAnalytique() {
        return nAnalytique;
    }

    public void setNAnalytique(short nAnalytique) {
        this.nAnalytique = nAnalytique;
    }

    public String getCANum() {
        return cANum;
    }

    public void setCANum(String cANum) {
        this.cANum = cANum;
    }

    public byte[] getCbCANum() {
        return cbCANum;
    }

    public void setCbCANum(byte[] cbCANum) {
        this.cbCANum = cbCANum;
    }

    public String getCAIntitule() {
        return cAIntitule;
    }

    public void setCAIntitule(String cAIntitule) {
        this.cAIntitule = cAIntitule;
    }

    public Short getCAType() {
        return cAType;
    }

    public void setCAType(Short cAType) {
        this.cAType = cAType;
    }

    public String getCAClassement() {
        return cAClassement;
    }

    public void setCAClassement(String cAClassement) {
        this.cAClassement = cAClassement;
    }

    public byte[] getCbCAClassement() {
        return cbCAClassement;
    }

    public void setCbCAClassement(byte[] cbCAClassement) {
        this.cbCAClassement = cbCAClassement;
    }

    public String getCARaccourci() {
        return cARaccourci;
    }

    public void setCARaccourci(String cARaccourci) {
        this.cARaccourci = cARaccourci;
    }

    public byte[] getCbCARaccourci() {
        return cbCARaccourci;
    }

    public void setCbCARaccourci(byte[] cbCARaccourci) {
        this.cbCARaccourci = cbCARaccourci;
    }

    public Short getCAReport() {
        return cAReport;
    }

    public void setCAReport(Short cAReport) {
        this.cAReport = cAReport;
    }

    public Short getNAnalyse() {
        return nAnalyse;
    }

    public void setNAnalyse(Short nAnalyse) {
        this.nAnalyse = nAnalyse;
    }

    public Short getCASaut() {
        return cASaut;
    }

    public void setCASaut(Short cASaut) {
        this.cASaut = cASaut;
    }

    public Short getCASommeil() {
        return cASommeil;
    }

    public void setCASommeil(Short cASommeil) {
        this.cASommeil = cASommeil;
    }

    public Date getCADateCreate() {
        return cADateCreate;
    }

    public void setCADateCreate(Date cADateCreate) {
        this.cADateCreate = cADateCreate;
    }

    public Short getCADomaine() {
        return cADomaine;
    }

    public void setCADomaine(Short cADomaine) {
        this.cADomaine = cADomaine;
    }

    public BigDecimal getCAAchat() {
        return cAAchat;
    }

    public void setCAAchat(BigDecimal cAAchat) {
        this.cAAchat = cAAchat;
    }

    public BigDecimal getCAVente() {
        return cAVente;
    }

    public void setCAVente(BigDecimal cAVente) {
        this.cAVente = cAVente;
    }

    public Short getCbProt() {
        return cbProt;
    }

    public void setCbProt(Short cbProt) {
        this.cbProt = cbProt;
    }

    public Integer getCbMarq() {
        return cbMarq;
    }

    public void setCbMarq(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public String getCbCreateur() {
        return cbCreateur;
    }

    public void setCbCreateur(String cbCreateur) {
        this.cbCreateur = cbCreateur;
    }

    public Date getCbModification() {
        return cbModification;
    }

    public void setCbModification(Date cbModification) {
        this.cbModification = cbModification;
    }

    public Integer getCbReplication() {
        return cbReplication;
    }

    public void setCbReplication(Integer cbReplication) {
        this.cbReplication = cbReplication;
    }

    public Short getCbFlag() {
        return cbFlag;
    }

    public void setCbFlag(Short cbFlag) {
        this.cbFlag = cbFlag;
    }

    @XmlTransient
    public Collection<FComptet> getFComptetCollection() {
        return fComptetCollection;
    }

    public void setFComptetCollection(Collection<FComptet> fComptetCollection) {
        this.fComptetCollection = fComptetCollection;
    }

    @XmlTransient
    public Collection<FComptet> getFComptetCollection1() {
        return fComptetCollection1;
    }

    public void setFComptetCollection1(Collection<FComptet> fComptetCollection1) {
        this.fComptetCollection1 = fComptetCollection1;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cbMarq != null ? cbMarq.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FComptea)) {
            return false;
        }
        FComptea other = (FComptea) object;
        if ((this.cbMarq == null && other.cbMarq != null) || (this.cbMarq != null && !this.cbMarq.equals(other.cbMarq))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityprojet.FComptea[ cbMarq=" + cbMarq + " ]";
    }
    
}
